/**
 * Urban Parks 
 *
 * Team M&M'S 
 * Michael Pogson
 * Michael Satran Jr.
 * Stehpen Hunter
 * 
 * Date: ${date}
 */

package model;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Stephen Hunter
 * @version Winter 2012
 */
public class ParkManager extends User {

	/**
	 * The list of parks controlled by the park manager.
	 */
	private final Collection<Park> my_parks = new ArrayList<Park>();
	
	
	/*
	 * @pre the_firstName != null
	 * @pre the_lastName != null
	 * @pre the_phoneNumber != null
	 * @pre the_email != null
	 * 
	 * @post my_firstName == the_firstName
	 * @post my_lastName == the_lastName
	 * @post my_phoneNumber == the_phoneNumber
	 * @post my_email == the_email
	 */
	/**
	 * Constructor creates a park manager object with the given values.
	 * 
	 * @param the_firstName The name to set as the PM's first name
	 * @param the_lastName The name to set as the PM's last name
	 * @param the_phoneNumber The String to set as the PM's phone number
	 * @param the_email The email to set as the PM's email
	 */
	public ParkManager(final String the_firstName, final String the_lastName,
			final String the_phoneNumber, final String the_email) {
		
		super(the_firstName, the_lastName,the_phoneNumber, the_email);
		
	}
	
	/*
	 * @pre the_park != null
	 * 
	 * @post my_parks will contain the_park
	 */
	/**
	 * Adds the given park to the PM's list of parks.
	 * 
	 * @param the_park The park to be added to the PM's list of parks
	 */
	public void addPark(final Park the_park) throws IllegalArgumentException {
		if (the_park == null) {
			throw new IllegalArgumentException("Park is null.");
		} else {
			my_parks.add(the_park);
		}
	}
	
	/*
	 * @post Returns all the parks under the control of the park manager
	 */
	/**
	 * Returns a Collection of the parks controlled by the PM.
	 * 
	 * @return A Collection of the parks controlled by the PM
	 */
	public Collection<Park> getParks() {	
		return my_parks;
	}
	
	
}
